package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Student;
import cn.edu.cimv.dao.mapper.StudentMapper;
import cn.edu.cimv.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Autowired private StudentMapper studentMapper;
    @Override
    public void editStudent(Student student) {
        studentMapper.insertStudent(student);
    }

    @Override
    public List<Student> queryStudent(int flag) {
        return studentMapper.queryStudent(flag);
    }

    @Override
    public void deleteStudent(int id) {
        studentMapper.deleteStudent(id);
    }

    @Override
    public Student queryStudentById(int id) {
        return studentMapper.queryStudentById(id);
    }

    @Override
    public void updateStudent(Student student) {
        studentMapper.updateStudent(student);
    }
}
